package main

import "fmt"

type Humaner interface {
	SayHi()
}

type Personer interface {
	Humaner
	Sing(lyrics string)
}

type Student struct {
	name string
	score float64
}

func (s *Student) SayHi() {
	fmt.Printf("Student[%s, %f] say hi!!\n", s.name, s.score)
}

//Student实现sing()方法
func (s *Student) Sing(lyrics string) {
	fmt.Printf("Student sing[%s]!!\n", lyrics)
}

func main() {
	//定义一个接口类型变量，可以接受任何类型的赋值
	//var i2 Personer
	s := &Student{"mike", 89}
	//i2 = s
	//i2.SayHi()
	//i2.Sing("学生歌")
	s.SayHi()
	s.Sing("学生歌")
}
